

using System;
using System.Text;

using NHibernate;
using NHibernate.Cfg;
using NHibernate.Criterion;
using NHibernate.Exceptions;

using SpotifyGenNHibernate.EN.Spotify;
using SpotifyGenNHibernate.CAD.Spotify;

namespace SpotifyGenNHibernate.CEN.Spotify
{
        public partial class ArtistaCEN
        {
        private IArtistaCAD _IArtistaCAD;

        public ArtistaCEN(IArtistaCAD _IArtistaCAD)
        {
                this._IArtistaCAD = _IArtistaCAD;
        }

        public int CrearArtista (int p_IdArtista, String p_Nombre, String p_Descripcion, System.Collections.Generic.IList<SpotifyGenNHibernate.EN.Spotify.AlbumEN> p_album)
        {
                ArtistaEN artistaEN = null;
                int oid;

                //Initialized ArtistaEN
                artistaEN = new ArtistaEN ();
                artistaEN.IdArtista = p_IdArtista;
                artistaEN.Nombre = p_Nombre;
                artistaEN.Descripcion = p_Descripcion;
                artistaEN.Album = p_album;
                //Call to ArtistaCAD

                oid = _IArtistaCAD.CrearArtista (artistaEN);
                return oid;
        }

        public ArtistaEN ObtenerDatos (int IdArtista)
        {
                ArtistaEN artistaEN = null;

                artistaEN = _IArtistaCAD.ObtenerDatos (
                        IdArtista

                        );
                return artistaEN;
        }

        public void ModificarDatos (int p_Artista_OID, String p_Nombre, String p_Descripcion)
        {
                ArtistaEN artistaEN = null;

                //Initialized ArtistaEN
                artistaEN = new ArtistaEN ();
                artistaEN.IdArtista = p_Artista_OID;
                artistaEN.Nombre = p_Nombre;
                artistaEN.Descripcion = p_Descripcion;
                //Call to ArtistaCAD

                _IArtistaCAD.ModificarDatos (artistaEN);
        }

        public void BorrarArtista (int IdArtista)
        {
                _IArtistaCAD.BorrarArtista (
                        IdArtista

                        );
        }
        }
}
